//
//  ImageNavigationController.m
//  FMRecordVideo
//
//  Created by 高波 on 2019/4/17.
//  Copyright © 2019 SF. All rights reserved.
//

#import "ImageNavigationController.h"

@interface ImageNavigationController ()

@end

@implementation ImageNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    UINavigationBar *bar = [UINavigationBar appearance];
    
    
    [bar setTitleTextAttributes:@{
                                  NSFontAttributeName:[UIFont systemFontOfSize:16]
                                  }];
    [bar setBarTintColor:[UIColor whiteColor]];     //修改bar 的 背景颜色和高光颜色
    //    [bar setBarTintColor:[UIColor colorWithRed:4/255.0 green:154/255.0 blue:252/255.0 alpha:1]];
    bar.titleTextAttributes = @{
                                NSForegroundColorAttributeName:[UIColor whiteColor] //标题颜色
                                };
    [bar setTintColor:[UIColor whiteColor]];    //bar 的 元素颜色（目前知道的是所有元素）
    
    [bar setBackgroundImage:[UIImage imageNamed:@"naviBg"] forBarMetrics:UIBarMetricsDefault];
    
    UIBarButtonItem *barItem = [UIBarButtonItem appearance];
    [barItem setTitleTextAttributes:@{
                                      NSFontAttributeName:[UIFont systemFontOfSize:16],
                                      } forState:UIControlStateNormal];
    [barItem setTitleTextAttributes:@{
                                      NSForegroundColorAttributeName:[UIColor whiteColor]
                                      } forState:UIControlStateNormal];
    
    [barItem setTintColor:[UIColor whiteColor]];
    
    [self.navigationItem.backBarButtonItem setTitleTextAttributes:@{
                                                                    NSFontAttributeName:[UIFont systemFontOfSize:16]
                                                                    } forState:UIControlStateNormal];
}


@end
